<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>lib/vfs/README</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.5.7' />
<meta http-equiv='Content-Style-Type' content='text/css' />
<link rel='stylesheet' type='text/css' href='../style.css' />
</head>
<body>
<!-- beginning of fixed guide -->
<div id='guide'><ul>
<li><a href='#TOP'><img class='icon' src='../icons/first.png' alt='[^]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/last.png' alt='[v]' /></a></li>
<li><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a></li>
<li><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a></li>
<li><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a></li>
<li class='standout'><span><a href='../files/lib.html'>lib</a>/<a href='../files/lib--vfs.html'>vfs</a>/README</span></li>
</ul></div>
<!-- end of fixed guide -->
<a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/lib.html'>lib</a>/<a href='../files/lib--vfs.html'>vfs</a>/README</h2>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><img class='icon' src='../icons/n_top.png' alt='[top]' /><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+1 lib/vfs/README'  /> */</em>
<hr />
<pre>
<a id='L1' name='L1'></a>NOTE: Although vfs has been meant to be implemented as a separate
<a id='L2' name='L2'></a>entity redistributable under the LGPL in its current implementation it
<a id='L3' name='L3'></a>uses GPLed code from src/. So there are two possibilities if you want
<a id='L4' name='L4'></a>to use vfs:
<a id='L5' name='L5'></a> 
<a id='L6' name='L6'></a>1. Distribute your copy of vfs under the GPL. Then you can freely
<a id='L7' name='L7'></a>include the GPLed functions from the rest of the mc source code.
<a id='L8' name='L8'></a> 
<a id='L9' name='L9'></a>2. Distribute your copy of vfs under the LGPL. Then you cannot include
<a id='L10' name='L10'></a>the functions outside the vfs subdirectory. You must then either
<a id='L11' name='L11'></a>rewrite them or work around them in other ways.
<a id='L12' name='L12'></a> 
<a id='L13' name='L13'></a>========================================================================
<a id='L14' name='L14'></a> 
<a id='L15' name='L15'></a>Hi!
<a id='L16' name='L16'></a> 
<a id='L17' name='L17'></a>I'm midnight commander's vfs layer. Before you start hacking me,
<a id='L18' name='L18'></a>please read this file. I'm integral part of midnight commander, but I
<a id='L19' name='L19'></a>try to go out and live my life myself as a shared library, too. That
<a id='L20' name='L20'></a>means that I should try to use as little functions from midnight as
<a id='L21' name='L21'></a>possible (so I'm tiny, nice and people like me), that I should not
<a id='L22' name='L22'></a>pollute name space by unnecessary symbols (so I do not crash fellow
<a id='L23' name='L23'></a>programs) and that I should have a clean interface between myself and
<a id='L24' name='L24'></a>midnight.
<a id='L25' name='L25'></a> 
<a id='L26' name='L26'></a>Because I'm rather close to midnight, try to:
<a id='L27' name='L27'></a> 
<a id='L28' name='L28'></a>* Keep the indentation as the rest of the code. Following could help
<a id='L29' name='L29'></a>you with your friend emacs:
<a id='L30' name='L30'></a> 
<a id='L31' name='L31'></a>(defun mc-c-mode ()
<a id='L32' name='L32'></a>        "C mode with adjusted defaults for use with the Midnight commander."
<a id='L33' name='L33'></a>        (interactive)
<a id='L34' name='L34'></a>        (c-mode)
<a id='L35' name='L35'></a>        (c-set-style "K&amp;R")
<a id='L36' name='L36'></a>        (setq   c-indent-level 4
<a id='L37' name='L37'></a>                c-continued-statement-offset 4
<a id='L38' name='L38'></a>                c-brace-offset 0
<a id='L39' name='L39'></a>                c-argdecl-indent 4
<a id='L40' name='L40'></a>                c-label-offset -4
<a id='L41' name='L41'></a>                c-brace-imaginary-offset 0
<a id='L42' name='L42'></a>                c-continued-brace-offset 0
<a id='L43' name='L43'></a>                c-tab-always-indent nil
<a id='L44' name='L44'></a>                c-basic-offset 4
<a id='L45' name='L45'></a>                tab-width 8
<a id='L46' name='L46'></a>                comment-column 60))
<a id='L47' name='L47'></a> 
<a id='L48' name='L48'></a>(setq auto-mode-alist (cons '(".*/mc/.*\\.[ch]$" . mc-c-mode)
<a id='L49' name='L49'></a>                       auto-mode-alist))
<a id='L50' name='L50'></a> 
<a id='L51' name='L51'></a>And because I'm trying to live life on my own as libvfs.so, try to:
<a id='L52' name='L52'></a> 
<a id='L53' name='L53'></a>* Make sure all exported symbols are defined in vfs.h and begin with
<a id='L54' name='L54'></a>'vfs_'.
<a id='L55' name='L55'></a> 
<a id='L56' name='L56'></a>* Do not make any references from midnight into modules like tar. It
<a id='L57' name='L57'></a>would probably pollute name space and midnight would depend on concrete
<a id='L58' name='L58'></a>configuration of libvfs. mc_setctl() and mc_ctl() are your
<a id='L59' name='L59'></a>friends. (And mine too :-).
<a id='L60' name='L60'></a> 
<a id='L61' name='L61'></a>                                                         Pavel Machek
<a id='L62' name='L62'></a>                                                         pavel@ucw.cz
<a id='L63' name='L63'></a> 
<a id='L64' name='L64'></a>PS: If you'd like to use my features in whole operating system, you
<a id='L65' name='L65'></a>might want to link me to rpc.nfsd. On
<a id='L66' name='L66'></a>http://atrey.karlin.mff.cuni.cz/~pavel/podfuk/podfuk.html you'll find
<a id='L67' name='L67'></a>how to do it.
<a id='L68' name='L68'></a> 
<a id='L69' name='L69'></a>PPS: I have a friend, shared library called avfs, which is LD_PRELOAD
<a id='L70' name='L70'></a>capable. You can reach her at http://www.inf.bme.hu/~mszeredi/avfs.
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a><img class='icon' src='../icons/n_bottom.png' alt='[bottom]' /><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+70 lib/vfs/README'  /> */</em>
</body>
</html>
